package com.sz.fpmatch;


public class NativeAPI {
	
	// global defines -------------------------------------------------------
	public static final int SZ_TEMPLATE_SIZE				= (570);

	
	// return codes ---------------------------------------------------------
	public static final int ERR_SUCCESS						= (0);
	public static final int ERR_LOAD_LIB_FAIL				= (-1);
	public static final int ERR_LOAD_FUNC_FAIL				= (-2);
	public static final int ERR_JNI_ERROR					= (-10);
	public static final int ERR_LIB_NOT_LOAD				= (-20);
	public static final int ERR_MEMORY_ERROR				= (-30);
	
	
	// load library ---------------------------------------------------------
	static {
		System.loadLibrary("fpmatchjni");
	}
	
	public NativeAPI() {
		
	}
	
	// exported native functions --------------------------------------------
	public native int JFPMatchInit();
	public native int JFPMatchDestroy();
	public native int JFPMatch(byte[] pbQuery, byte[] pbRegX, int nLevel, int[] pnSimilarity);
	
}
